using ServiceStack.Logging;
using System;
namespace ServiceStack.Support
{
	public class InMemoryLogFactory : ILogFactory
	{
		private readonly bool debugEnabled;
		public InMemoryLogFactory(bool debugEnabled = false)
		{
			this.debugEnabled = debugEnabled;
		}
		public ILog GetLogger(Type type)
		{
			return new InMemoryLog(type.Name)
			{
				IsDebugEnabled = this.debugEnabled
			};
		}
		public ILog GetLogger(string typeName)
		{
			return new InMemoryLog(typeName)
			{
				IsDebugEnabled = this.debugEnabled
			};
		}
	}
}
